﻿<UserControl x:Class="dotNails.UI.ConnectionStringManager"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid>
        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0.765" Fill="#FF252525" />

        <Border CornerRadius="30" Width="449" Height="153" BorderBrush="{DynamicResource Text1Brush}" BorderThickness="1" Background="#444444">

            <StackPanel Margin="10, 8, 10, 8">

                <Grid Margin="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="95"/>
                        <RowDefinition Height="40"/>
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" Margin="0 15">
                        <TextBlock Text="Connection String" VerticalAlignment="Top" FontSize="16" Margin="0 0 5 0"/>
                        <TextBox x:Name="txtConnectionString" Height="58" TextWrapping="Wrap" AcceptsReturn="True" Width="250" VerticalAlignment="Top"/>
                        <Button x:Name="btnTest" Content="Test" Click="btnTest_Click" Width="40" Height="25" Margin="5 0 0 0" VerticalAlignment="Top"/>
                    </StackPanel>

                    <TextBlock x:Name="TestResult" FontSize="32" Foreground="Red" Text="Connection Failed" HorizontalAlignment="Center" VerticalAlignment="Bottom" Visibility="Collapsed"/>

                    <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
                        <Button x:Name="btnSave" Content="Save" Click="btnSave_Click" Width="60" Height="30" Margin="0 0 5 0" />
                        <Button x:Name="btnCancel" Content="Cancel" Click="btnCancel_Click" Width="60" Height="30" Margin="5 0 0 0" />
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Border>
    </Grid>

</UserControl>
